﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ViewInvoice.aspx.cs" Inherits="ViewInvoice" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <asp:Panel ID="AuthenticatedHeaderPanel" runat="server">
        <ul id="user">
            <li>
                <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Login.aspx" />
            </li>
        </ul>

        <div id="header-inner">
            <div class="textt">
            <h4>
                <asp:Label runat="server" ID="WelcomeBackMessage"></asp:Label>
                <asp:label id="lblMessage" runat="server" enableviewstate="false" />
            </h4>
            </div>
        </div>
    </asp:Panel>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Menu" Runat="Server">
<div id="left">
<div id = "navigation">
            <asp:panel runat="server" id="AuthenticatedMenuPanel" width="200px">
                <div id="menu-header">
                    <div class="menutext">
                        <asp:label ID="Label1" runat="server" text="Menu" />
                    </div>
                </div>
                <asp:menu id="Menu1" runat="server" staticdisplaylevels="3" backcolor="White" dynamichoverstyle-borderstyle="NotSet" width="200px">
                   <items>                
                    <asp:MenuItem Text="Home" Value="Home" navigateurl="Default.aspx">
                      <%--<asp:MenuItem Text="New Document" Value="New Document" navigateurl="AddDocument.aspx"/>--%>
                    </asp:MenuItem>

                    <asp:MenuItem Text="Users" Value="My_Users" navigateurl="MyUsers.aspx">
                      <%--<asp:MenuItem Text="New User" Value="New_User" navigateurl="AddUser.aspx">--%>
                    </asp:MenuItem>

                    <asp:MenuItem Text="Companies" Value="Companies" navigateurl="MyCompanies.aspx">
                      <%--<asp:MenuItem Text="New Company" Value="New_Company" navigateurl="AddCompany.aspx"/>--%>
                    </asp:MenuItem>

                    <asp:MenuItem Text="Clients" Value="Clients" navigateurl="MyClients.aspx">
                      <%--<asp:MenuItem Text="New Client" Value="New_Client" navigateurl="AddClient.aspx"/>--%>                   
                    </asp:MenuItem>
                  </items>
                </asp:menu>
            </asp:panel>
    </div>
</div>
</asp:Content>

        
<asp:Content ID="Content3" runat="server" contentplaceholderid="MainContent">
   <div id= "right"> 
    <asp:Panel runat="server" ID="AuthenticatedMessagePanel">
        <div class="box">
            <div class ="title">
                <h6>
                    <asp:Label ID="Label2" runat="server" Text="Document:"></asp:Label>
                </h6>
            </div>
        <div class="lists" id="shit" runat="server">
            <asp:Label ID="lblDocumentID" runat="server" Text=""/>
            <table id="document" style="border-bottom: 1px solid black;">
              <tbody>
                <tr>
                  <th colspan="4">
                      <asp:Label ID="lbl_doc_type" runat="server" Text="Document type"></asp:Label> 
                      :&nbsp;<asp:Label ID="lbl_doc_num" runat="server" Text="Document num."></asp:Label>
                  </th>
                </tr>
                <tr>
                  <td class="pakreisi" colspan="4"><asp:Label ID="lbl_doc_date" runat="server" Text="Document date"></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi"><strong>Preču nosūtītājs:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_company_by" runat="server" Text="Company by"></asp:Label></td>
                  <td class="pakreisi"><strong>Reģ. Nr.:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_company_by_reg" runat="server" Text="Company by reg. nr."></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi"><strong>Adrese:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_company_by_address" runat="server" Text="Company by address"></asp:Label></td>
                  <td class="pakreisi"><strong>PVN Reģ. Nr.:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_company_by_vat" runat="server" Text="Company by vat"></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi" rowspan=2 ><strong>Norēķinu rekvizīti:</strong></td>	  
                  <td class="centrs" rowspan=2 ><asp:Label ID="lbl_company_by_bank" runat="server" Text="Company by bank"></asp:Label></td>
	              <td class="pakreisi"><strong>Konts:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_company_by_account" runat="server" Text="Company by account"></asp:Label></td>
                </tr>
                <tr>
	              <td class="pakreisi"><strong>Kods:</strong></td>
	              <td class="centrs"><asp:Label ID="lbl_company_by_bank_swift" runat="server" Text="Company by bank swift"></asp:Label> </td>      
                </tr>
                <tr>
                  <td class="pakreisi"><strong>Izsniegšanas vieta: </strong> </td>
                  <td class="centrs"><asp:Label ID="lbl_client_to_address2" runat="server" Text="Delivery place"></asp:Label></td>
                  <td class="pakreisi"></td>
                  <td class="pakreisi"></td>
                </tr>
             </tbody>
           </table>
           <table id="document" style="border-top: 1px solid black; border-bottom: 1px solid black;">
             <tbody>
                <tr>
                  <td class="pakreisi"><strong>Preču saņēmējs:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_client_to" runat="server" Text="Client to"></asp:Label></td>
                  <td class="pakreisi"><strong>Reģ. Nr.:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_client_to_reg" runat="server" Text="Client to reg. nr."/></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi"><strong>Adrese:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_client_to_address" runat="server" Text="Client to address"></asp:Label></td>
                  <td class="pakreisi"><strong>PVN Reģ. Nr.:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_client_to_vat" runat="server" Text="Client to vat"></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi" rowspan = 2 ><strong>Norēķinu rekviziti:</strong></td>
                  <td class="centrs" rowspan = 2><asp:Label ID="lbl_client_to_bank" runat="server" Text="Client bank"></asp:Label></td>
                  <td class="pakreisi"><strong>Konts:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_client_to_account" runat="server" Text="Client to account"></asp:Label></td>
                </tr>
                <tr>
	              <td class="pakreisi"><strong>Kods:</strong></td>
	              <td class="centrs"><asp:Label ID="lbl_client_to_bank_swift" runat="server" Text="Client to bank swift"></asp:Label></td>
                </tr>
                <tr>
                  <td class="pakreisi"><strong>Piegādes vieta:</strong></td>
                  <td class="centrs"><asp:Label ID="lbl_delivery_place" runat="server" Text="Client to address"/></td>
                  <td class="pakreisi"></td>
                  <td class="pakreisi"></td>
                </tr>
              </tbody>
           </table>
           <table id="document" style="border-top: 1px solid black;">
             <tbody>
	            <tr>
                  <td class="pakreisi"><strong>Samaksas veids:</strong></td>
	              <td class="centrs"><asp:Label ID="lbl_payment_type" runat="server" Text="Payment type"/></td>
                  <td class="pakreisi"></td>
                  <td class="pakreisi"></td>
                </tr>
	            <tr>
                  <td class="pakreisi"><strong>Samaksāt līdz:</strong></td>
	              <td class="centrs"><asp:Label ID="lbl_payment_date" runat="server" Text="Payment date"/></td>
                  <td class="pakreisi"></td>
                  <td class="pakreisi"></td>
                </tr>
              </tbody>
            </table>
                    <asp:ListView ID="article_list" runat="server" onitemdatabound="article_list_ItemDataBound" onprerender="article_list_PreRender1">
                         <LayoutTemplate>
                            <table id="article">
                                  <thead>
                                      <tr>
                                         <td class="centr" colspan=2 style="width: 380px" ><strong>Nosaukums</strong></td>
	                                     <td class="centr"><strong>Vienība</strong></td>
                                         <td class="centr"><strong>Skaits</strong></td>
	                                     <td class="centr"><strong>Cena, Ls</strong></td>
	                                     <td class="centr"><strong>Summa, Ls</strong></td>
                                      </tr>
                                   </thead>
                                  <tr ID="itemPlaceholder" runat="server"></tr>
	                              <tr>
	                                    <td colspan=4 style="border: none;"><strong>Kopā izsniegts:</strong></td>
	                                    <td></td>
	                                    <td class="centr"><asp:Label ID="lbl_kopa" runat="server"></asp:Label></td>
                                  </tr>
	                              <tr>
	                                  <td colspan=4 style="border: none;"><strong>Pievienotās vērtības nodoklis:</strong></td>
	                                  <td class="centr"><asp:Label ID="lbl_PVN_likme" runat="server"/></td>
	                                  <td class="centr"><asp:Label ID="lbl_PVN" runat="server"/></td>
                                  </tr>
	                              <tr>
	                                  <td colspan=4 style="border: none;"><strong>Pavisam apmaksai:</strong></td>
	                                  <td class="centr">(ar cipariem)</td>
	                                  <td class="centr"><asp:Label ID="lbl_pavisam" runat="server"/></td>
                                  </tr>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr>
                                <td class="kreisi" colspan=2 style="width: 380px" >
                                    <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("_article_name") %>' />
                                </td>
                                <td class="centr" >
                                    <asp:Label ID="Label3" runat="server" Text="gab." />
                                </td>
                                <td class="centr">
                                    <asp:Label ID="countLabel" runat="server" Text='<%# Eval("_article_count") %>' />
                                </td>
                                <td class="centr">
                                    <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("_article_price") %>' />
                                </td>
                                <td class="centr" id="article_sum">
                                    <asp:Label ID="sumLabel" runat="server" Text='<%# Eval("_article_sum") %>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:ListView>
            <table id="document">
              <tbody>
                <tr>
                  <td class="pakreisi" colspan=4 style="border-bottom: 1px solid #000000" >(ar vārdiem)</td>
                </tr>
	            <tr>
                  <td class="pakreisi"><strong>Izsniedza:</strong></td>
	              <td class="centrs" ><asp:Label ID="lbl_user" runat="server" Text="Issued by user"/></td>
                  <td class="pakreisi"><strong>Pieņēma:</strong></td>
                  <td class="centrs"></td>
                </tr>
	            <tr>
                  <td class="pakreisi"><strong>Datums:</strong></td>
	              <td class="centrs"><asp:Label ID="lbl_doc_date2" runat="server" Text="Document date"/></td>
                  <td class="pakreisi"><strong>Datums:</strong></td>
                  <td class="centrs"></td>
                </tr>
	            <tr>
                  <td class="pakreisi"><strong>Paraksts:</strong></td>
                  <td class="centrs"></td>
                  <td class="pakreisi"><strong>Paraksts:</strong></td>
                  <td class="centrs"></td>
                </tr>
              </tbody>
            </table>
        <br />
    </div>
        <asp:ImageButton ID="lnkprintPDF" runat="server" ImageUrl="~/Images/print_PDF_l.png" ToolTip="To PDF file" OnClick="lnkprintPDF_Click"/></div>
    </asp:Panel>
</div>
</asp:Content>
